﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DiscoveryLogic.Analytics.DataObjects;
using DiscoveryLogic.Analytics.DataObjects.Networks;
using DiscoveryLogic.Common.Utilities;

namespace DiscoveryLogic.Analytics.BusinessLogic.Algorithms
{
    public interface INetworkMeasure
    {
        IVerticeMeasure VerticeMeasurer { get; set; }
        IEdgeMeasure EdgeMeasurer { get; set; }
        IGraphMeasure GraphMeasurer { get; set; }
    }

    public interface IVerticeMeasure
    {
        ICentralityMeasure CentralityMeasurer { get; set; }
        IDegreeMeasure DegreeMeasurer { get; set; }
    }

    public interface IDegreeMeasure
    {
        Dictionary<EntityBase, int> CalculateDegrees(Network network);
        Dictionary<EntityBase, int> CalculateInDegrees(Network network);
        Dictionary<EntityBase, int> CalculateOutDegrees(Network network);
    }

    public interface ICentralityMeasure
    {
        string Algorithm { get; }
        Dictionary<EntityBase, double> CalculateCentralities(Network network);
    }

    public interface IEdgeMeasure
    {
        Range<double> GetDistanceRange(Network network);
        double GetAvgDistance(Network network);

    }

    public interface IGraphMeasure
    {
        double GetGraphDensity(Network network);
        IGraphPartitionMeasure PartitionMeasurer { get; set; }
    }

    public interface IGraphPartitionMeasure
    {
        string Algorithm { get; }
        List<Network> Partition(Network network);
    }
}
